export const schema = {
    type: "page",
    title: "认领管理",
    body: [
        {
            type: "nav",
            stacked: false,
            links: [
                {
                    label: "项目编辑",
                    to: "/claim_project/edit/${id}"
                },
                {
                    label: "认领管理",
                    to: "/claim_project/${id}/apply"
                }
            ]
        },

        {
            type: "wrapper",
            className: "no-bg no-padder",

            body: [{
                type: "crud",
                className: 'b-l b-b b-r bg-white no-padder',
                api: "/api/claim_project/${params.id}/apply",
                panelClassName: "no-border no-shadow bg-white",
                toolbarInline: true,
                columnsTogglable: false,
                columns: [
                    {
                        label: "团队",
                        name: 'team_name'
                    },
                    {
                        label: "联系人",
                        name: "contact_name"
                    },
                    {
                        label: "联系电话",
                        name: 'contact_phone'
                    },
                    {
                        label: "邮箱",
                        name: 'contact_email'
                    },
                    {
                        label: "报名时间",
                        name: 'created_at',
                        type: 'tpl',
                        tpl: "${created_at|date:LL:YYYY-MM-DD HH:mm:ss}"
                    },
                    {
                        type: 'operation',
                        label: '操作',
                        buttons: [
                            {
                                type: 'button',
                                label: '删除',
                                actionType: 'ajax',
                                api: 'delete:/api/claim_project/${params.id}/apply/${id}'
                            }
                        ]
                    }
                ]
            },


            {
                type: 'button',
                className: 'm-t',
                label: '导出报名表',
                level: 'info',
                actionType: 'url',
                url: '/api/claim_project/${id}/apply?asExcel=1&keyword=${keyword}'
            }]
        }
    ]
};
